package ObserverModel;

/**
 * Created by Lenovo on 2017/5/15.
 */
public class Test {

    public static void main(String[] args) {
        ConcreteSubject subject = new ConcreteSubject();

        subject.Attach(new ConcreteObserver("ObserverModel.Observer A", subject));
        subject.Attach(new ConcreteObserver("ObserverModel.Observer B", subject));
        subject.Attach(new ConcreteObserver("ObserverModel.Observer C", subject));

        subject.setSubjectState("Ready");
        subject.Notify();
    }

}
